1. Field of the Invention
The invention relates to a detection and compensation circuit, and more particularly to a circuit performing automatic leakage current detection and compensation.
2. Description of the Related Art
For a dynamic circuit, output errors generally occur due to leakage current at a floating node of the dynamic circuit. Here, the floating node is the node in the circuit without operating current directly passing therethrough. FIG. 1 shows a conventional D flip-flop (DFF). As shown in FIG. 1, the DFF receives an input signal D and a clock signal CLK, outputs the current voltage of the input signal D as the output signal Q at the rising (or falling) edge of clock signal CLK, and outputs an inverse of the input signal D as another output signal QB. FIG. 2 shows a detailed circuit diagram of a conventional True Single Phase Clock (TSPC) DFF. As shown in FIG. 2, when the clock signal CLK is 0, the transistors M1 and M3 are turned off. That is, the output node QB is now a floating node. Suppose that the original status at output node QB is 0, then leakage current would begin to charge the output node QB from the voltage source, to eventually change the status at the output node QB to 1 so that an erroneous output is generated (Q=0).
Since the amount of leakage current in advanced processes is already too large to be neglected, besides, the amount of leakage current is also large when the DFF is operated in low frequency, a circuit performing automatic leakage current detection and compensation is highly required so as to correct the effect caused by leakage current.